package com.blackcat.annotation.component;

import com.blackcat.annotation.component.component.MyLog;
import com.blackcat.annotation.component.config.MyConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * <p> 描述 ：
 * @author : blackcat
 * @date : 2020/5/23 16:06
 */
public class App {

    public static void main(String[] args) {
        // 容器中读取Bean
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(MyConfig.class);
        System.out.println(ctx.getBean(MyLog.class));
        System.out.println(ctx.getBean("info"));
    }
}
